import { createApp } from "vue"
import App from "./App.vue"
import { setupStore } from "@/store"
import router, { setupRouter } from "@/router"
import { setupNaiveDiscreteApi } from "@/discrete"
import { setupDirectives } from "./directives"

const app = createApp(App)

// 挂载状态管理
setupStore(app)

// 挂载 naive-ui 脱离上下文的 Api
setupNaiveDiscreteApi()

setupDirectives(app)

// 挂载路由
setupRouter(app)

await router.isReady()

app.mount("#app")
